import request from '@/utils/request'

export function getLessonCate(data) {
  return request({
    url: 'backend/essay/get-class-list',
    method: 'get',
    params: data
  })
}

export function getLessonList(data) {
  return request({
    url: 'backend/essay/get-essay-list',
    method: 'get',
    params: data
  })
}

export function getLessonStageOne(data) {
  return request({
    url: 'backend/essay/stage-one-list',
    method: 'get',
    params: data
  })
}

export function getLessonStageTwo(data) {
  return request({
    url: 'backend/essay/stage-two-list',
    method: 'get',
    params: data
  })
}

export function getTipList(data) {
  return request({
    url: 'backend/tips/tip-list',
    method: 'get',
    params: data
  })
}
// 查看课程详情
export function essayDetail(data) {
  return request({
    url: 'backend/essay/essay-detail',
    method: 'get',
    params: data
  })
}
// 删除课程
export function deleteEssay(data) {
  return request({
    url: 'backend/essay/delete-essay',
    method: 'get',
    params: data
  })
}
// 获取课程分类
export function getClass2List(data) {
  return request({
    url: 'backend/essay/get-all-class',
    method: 'get',
    params: data
  })
}
// 更新课程
export function updateLesson(data) {
  return request({
    url: 'backend/essay/essay-update',
    method: 'get',
    params: data
  })
}
// 新增课程
export function addLesson(data) {
  return request({
    url: 'backend/essay/essay-create',
    method: 'get',
    params: data
  })
}
// 获取课程一级分类数据
export function classOneList(data) {
  return request({
    url: 'backend/essay/get-class1-list',
    method: 'get',
    params: data
  })
}
// 新增课程分类
export function createOneClass(data) {
  return request({
    url: 'backend/essay/create-class-name',
    method: 'get',
    params: data
  })
}
// 删除课程分类
export function deleteOneClass(data) {
  return request({
    url: 'backend/essay/delete-class-name',
    method: 'get',
    params: data
  })
}
// 更新课程分类
export function updateOneClass(data) {
  return request({
    url: 'backend/essay/update-class-name',
    method: 'get',
    params: data
  })
}
// 新增一级阶段
export function addStageOne(data) {
  return request({
    url: 'backend/essay/create-stage-one',
    method: 'get',
    params: data
  })
}
// 删除一级阶段
export function deleteStageOne(data) {
  return request({
    url: 'backend/essay/delete-stage-one',
    method: 'get',
    params: data
  })
}
// 编辑一级阶段
export function updateStageOne(data) {
  return request({
    url: 'backend/essay/update-stage-one',
    method: 'get',
    params: data
  })
}

// 新增二级阶段
export function addStageTwo(data) {
  return request({
    url: 'backend/essay/create-stage-two',
    method: 'get',
    params: data
  })
}
// 删除二级阶段
export function deleteStageTwo(data) {
  return request({
    url: 'backend/essay/delete-stage-two',
    method: 'get',
    params: data
  })
}
// 编辑二级阶段
export function updateStageTwo(data) {
  return request({
    url: 'backend/essay/update-stage-two',
    method: 'get',
    params: data
  })
}
